<div class="px-3 pt-3 pb-2">
  <farris-radiogroup [horizontal]="true" [textField]="'text'" [valueField]="'value'" [data]="bindingTypeEnumData"
    [(ngModel)]="bindingType" (changeValue)="changeBindingType()">
  </farris-radiogroup>
</div>


<div class="f-utils-fill mb-2 mx-3 fieldPanel border">
  <farris-treetable #treeTable [data]="currentBindingTreeDataSource" [columns]="currentBindingTreeColumns"
    [idField]="'id'" [fixedHeader]="true" [width]="'100%'" [height]="360" [singleSelect]="true" [showFilterBar]="false"
    [resizableColumns]="true" [fit]="true" [showBorder]="false" [striped]="true">
    <ng-template farrisTemplate="body" let-rowIndex let-rowNode let-rowData="rowData" let-columns="columns">
      <tr [selectRow]="rowNode" [rowIndex]="" [dblclick]="true" [selectRowDisabled]="!rowNode.node.selectable"
        [class.farris-table-selectedrow]="rowNode.isSelected" [style.color]="rowNode.node.selectable?'':'#AAAAAA'">
        <td *ngFor="let col of columns; let i = index" style="padding: 0.25rem 0.75rem">
          <farris-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></farris-treeTableToggler>
          <ng-template [ngIf]="col.field!=='fieldType'" [ngIfElse]="fieldTypeTmpl">{{rowData[col.field]}}</ng-template>
          <ng-template #fieldTypeTmpl>
            {{rowData.$type==='SimpleField'&& rowData.type ? (rowData.multiLanguage ? '多语言': rowData.type.displayName): ''}}
          </ng-template>
        </td>
      </tr>
    </ng-template>

  </farris-treetable>
</div>


<ng-template #bindingFooter>
  <button type="button" class="btn btn-secondary" (click)="clickCancel()">取消</button>
  <button type="button" class="btn btn-primary" (click)="clickConfirm()">确定</button>
</ng-template>